package com.hexacta.hrs.test.data;

import java.util.List;
import java.util.Map;

import org.vectrics.domain.Domain;

/**
 * Test data dependency creator for the Domain class.
 * 
 * @author tpollak
 */
public class DomainTestDataDependencyCreator extends AbstractTestDataDependencyCreator {

    public static final String HEXACTA_DOMAIN = "HEXACTA_DOMAIN";

    public DomainTestDataDependencyCreator(List<TestDataDependencyCreator> dependencies) {
        super(dependencies);
    }

    public void createDependentTestData(Map<String, Object> context) {
        // Create one domain for Hexacta
        Domain hexactaDomain = this.createHexactaDomain();
        hexactaDomain = this.insertDomainObject(hexactaDomain);
        this.storeObjectReferenceInContext(context, HEXACTA_DOMAIN, hexactaDomain);
    }

    private Domain createHexactaDomain() {
        Domain hexactaDomain = new Domain();
        hexactaDomain.setDescription("Hexacta S.A.");
        hexactaDomain.setVoided(false);
        return hexactaDomain;
    }

}
